messages = [{'role': 'system', 'content': 'You are a helpful assistant.'},
            {'role': 'user', 'content': '如何做西红柿炒鸡蛋？'}]

# 替换数组中所有 'system' 角色的消息为 'acc'
for i, message in enumerate(messages):
    if message['role'] == 'system':
        messages[i]['role'] = 'acc'

print(messages)
